package cn.edu.eight.food.dao;


import cn.edu.eight.food.model.Foods;
import cn.edu.eight.food.model.OfFood;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface OfFoodMapper {
    int insert(OfFood record);

    int insertSelective(OfFood record);

    //查询所有食物
    List<Foods> foods(@Param("hot") int hot, @Param("foodName") String foodName);

    //修改食物信息
    int updateFood(OfFood record);

    //删除食物信息
    int deleteFood(@Param("foodId") String foodId);

    //食品展示
    List<OfFood> foodList(@Param("hot") int hot);

    //根据id查找食物
    OfFood findByIdFood(@Param("foodId") String foodId);
}